import { ViewEvent } from "../../Const";
import BaseModule from "../BaseModule";
import HomeView from "./HomeView";

export default class HomeModule extends BaseModule{
    private _view:HomeView=null
    init():void{
        this.message.on(ViewEvent.SHOW_HOME_VIEW,()=>{
            if(this._view==null){
                this._view=new HomeView()
                this._view.on('signin',()=>{
                    this.message.send(ViewEvent.SHOW_SIGNIN_DIALOG)
                })
            }
            this.main.addChild(this._view)
            //
            //
        })
    }
}